home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
fullpath.arc
/
FULLPATH.DOC
< prev
Wrap
Text File
|
1986-06-04
|
1KB
|
51 lines
NAME
fullpath - expand file-name to full description
SYNOPSIS
char *fullpath(char *)
NOTE
All uses of back-slash is really refering to "extern char _SLASH",
the directory separator character.
DESCRIPTION
Fullpath takes one parameter, and expands it as if it were a path-name.
All . and .. are delt with properly, and \.. will be assumed to be \,
as on UNIX systems.
The returning string (which is a static pointer, so when function is
called multiple times it's overwritten each time) is of the format:
<drive>:\<directory-path><file-name>
and is in lower case.
If drive is not given default is inserted. If path is not from root
then current directory is preceeded.
SPECIAL CASES
NULL passed returns NULL.
Multiple back-slashes are reduced to one.
Trailing back-slashes are erased (except for root).
EXAMPLES
Assuming current drive C, current directory \a\b. And drive A: has
current directory \m
x c:\a\b\x
..\d\x c:\a\d\x
. c:\a\b
.. c:\a
..\..\..\.. c:\
a:q\x a:\m\q\x
b:\x\y\.\z\.. b:\x\y